package com.shanglv.member.model;

import com.shanglv.dto.flight.demo.DemoDto;


public class Demo {

	private Integer id;

	private String title;

	private String description;

	public Demo() {
	}

	public Demo(DemoDto dto) {
		this.id = dto.getId();
		this.title = dto.getTitle();
		this.description = dto.getDescription();
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title == null ? null : title.trim();
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description == null ? null : description.trim();
	}

	public DemoDto toDto() {
		DemoDto dto = new DemoDto();
		dto.setId(id);
		dto.setTitle(title);
		dto.setDescription(description);
		return dto;
	}
}